#include <iostream>
#include <string>
#include <ctime>
#include <unistd.h>
#include <pthread.h>

using namespace std;

void *threadRun(void *arg)
{
    cout << "当前次线程的ID为 " << pthread_self() << endl;
    return nullptr;
}

int main()
{
    pthread_t t;
    pthread_create(&t, nullptr, threadRun, nullptr);

    pthread_join(t, nullptr);
    cout << "创建的次线程ID为 " << t << endl;

    return 0;
}
